<!DOCTYPE html>

<!-- Copyright (c) 2013, Google Inc. Please see the AUTHORS file for details.
     All rights reserved. Use of this source code is governed by a BSD-style
     license that can be found in the LICENSE file. -->

<!--
/**
 * spark-icon is a square-shaped glyph expressed as a background-image.
 *
 * Example:
 *
 *     <spark-icon src="star.png"></spark-icon>
 */
-->

<link rel="import" href="../../../packages/spark_widgets/common/spark_widget.html"/>

<polymer-element name="spark-icon" extends="spark-widget"
    attributes="src
                tooltip
                size">
  <template>
    <link rel="stylesheet" href="spark_icon.css">

    <style>
      #icon {
        background-image: url({{src}});
        width: {{size}};
        height: {{size}};
      }
    </style>

    <div id="icon" title?="{{tooltip}}"></div>
  </template>

  <script type="application/dart" src="spark_icon.dart"></script>
</polymer-element>
